/*@ File Name : type.h
  @ Date : 18/11/2011
  @ Author : Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

Fireworks simulation projet
Copyright (C) 2011 Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact us by sending mail at fireworks-simulation-project@googlecode.com*/

#if !defined(_TYPE_H)
#define _TYPE_H

#include "const.h"

union u_Type32
{
	void* _p;
	int _int;
	unsigned int _uint;
	short _short;
	unsigned short _ushort;
	char _char;
	unsigned char _uchar;
	float _float;
} typedef Type32;

union u_Type64
{
	void* _p;
	unsigned long* _ulong;
	long* _long;
	int _int;
	unsigned int _uint;
	short _short;
	unsigned short _ushort;
	char _char;
	unsigned char _uchar;
	float _float;
	double _double;
} typedef Type64;

enum e_TYPE
{
	TYPE_POINTER = 0,
	TYPE_LONG = 1,
	TYPE_ULONG = 2,
	TYPE_UINT = 3,
	TYPE_INT = 4,
	TYPE_USHORT = 5,
	TYPE_SHORT = 6,
	TYPE_UCHAR = 7,
	TYPE_CHAR = 8,
	TYPE_FLOAT = 9,
	TYPE_DOUBLE = 10
} typedef TYPE;

BOOL Type32_Compare(TYPE type, Type32 e1, Type32 e2);
BOOL Type64_Compare(TYPE type, Type64 e1, Type64 e2);

#endif /*_TYPE_H*/
